import _ from "lodash";
import moment from "moment";

export function dateFilter(value: number | string | Date): string {
    const date = new Date(value);
    if (!(date instanceof Date) || _.isNaN(date.getTime())) {
        return "recently";
    }
    return moment(date).format("YYYY-MM-DD")
}
